home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_11_07
/
1107121a
< prev
next >
Wrap
Text File
|
1993-05-05
|
347b
|
25 lines
//
// list.h - list interface using a friend class
//
class listnode
{
friend class list;
listnode(unsigned n, listnode *p)
: number(n), next(p) { }
unsigned number;
listnode *next;
};
class list
{
public:
list(unsigned n);
~list();
void add(unsigned n);
void print();
private:
listnode *first, *last;
};